DateSerialItem IncrementYears

Gets or Sets the number of years that should be added to calculate a new date for scanning.

public int IncrementYears {get;Set}

 

Return value

int No of years to be added

 

Example

Copy
// Use current date
dateSerialitem.UseCurrentDate = true;

// To increment Date, Month, Year 
dateSerialitem.IncrementYears  = 2;
dateSerialitem.IncrementMonths = 2;
dateSerialitem.IncrementDays   = 2;
// the new date would be 02 May 2025 

// Date format for Expiry date
dateSerialitem.CodeFormat = "EXP Date: [DD]/[MMM]/[YYYY]";

serialVar1.SerialItemList.Add(dateSerialitem);